<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>邀请好友</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="format-detection" content="telephone=no" />
	<link rel="stylesheet" href="../../css/public-heder-Reset.css">
	<link rel="stylesheet" href="../../css/M-Friends.css">
</head>
<body>
<div class="qr-code" style="width:100%;height:100%;position:fixed;background:rgba(0,0,0,0.5);z-index:220;display: none;">
	<div style="width:200px;border-radius:5px;position:absolute;left:50%;top:50%;padding:20px;background:#fff;line-height:20px;font-size:13px;text-align:center;margin:-100px 0 0 -100px">
		<div class="qr-back" style="width:30px;height:30px;font-size:20px;border-radius:15px;position:absolute;top:-12px;right:-8px;background:#fff;line-height:30px;text-align:center;>">×</div>
		<p>邀请好友扫一扫下图二维码</p>
		<div class="demo" style="margin-top:10px;">
			<div id="qrcodeTable" style="display:inline-block;"></div> 	
		</div>
	</div>
</div>
	<!-- page_box -->
	<div class="page-box">
		<!-- header -->
		<header class="page-header">
			<a href="javascript:history.go(-1)" class="back"></a>
			<p class="pege-name">邀请好友</p>
		</header>
		<div class="liubai"></div>
		<!-- header /-->
		<!-- Invite -->
		<div class="Invite"><img src="../../img/Invite.png"></div>
		<!-- Invite / -->
		<!-- InviteDetails -->
		<div class="InviteDetails">
			<div class="InviteNunber clear">
				<div class="number fl">
					<span>我的邀请码：</span>
					<em class="invite_code"></em>
				</div>
				<div class="copy fr">
					<a><button class="copy-butn">邀请好友</button></a>
				</div>
			</div>
			<table border="0" class="Details">
				<tr class="clear">
					<th>被邀请人<i></i></th>
					<th>注册时间<i></i></th>
					<th>已投资<i></i></th>
					<th>获得奖励</th>
				</tr>
			</table>
		</div>
		<!-- InviteDetails / -->
		<!--  -->
		<!-- <div class="Invite-btn">
			<button class="butn">邀请好友</button>
		</div> -->
		<!--  --><!-- fixed-share -->
		<!-- <div class="fixed-share">
			<div class="share">
				<ul class="absolute clear">
					<li>
						<i></i>
						<span>微信</span>
					</li>
					<li>
						<i></i>
						<span>QQ</span>
					</li>
					<li>
						<i></i>
						<span>面对面扫码</span>
					</li>	
					<li>
						<i></i>
						<span>朋友圈</span>
					</li>
					<li>
						<i></i>
						<span>QQ空间</span>
					</li>
					<li>
						<i></i>
						<span>新浪微博</span>
					</li>	
					
				</ul>
				<div  style="width:100%;height:400px;"></div>
				<button class="butn">取消</button>
			</div>
		</div> -->
		<!-- fixed-share /-->
	</div>
<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/dropload.js"></script>
<script type="text/javascript" src="../../js/http-url.js"></script>
<script type="text/javascript" src="../../js/jquery.qrcode.js"></script>
<script type="text/javascript" src="../../js/qrcode.js"></script>
<script type="text/javascript">
	$(function(){
		$('.qr-back').click(function(){
			$('.qr-code').hide();	
		});
	     var projectsNuber=0;
	    $('.page-box').dropload({
	        scrollArea : window,
	        loadDownFn : function(me){
	          ajaxRequest('/api/user/invite/'+projectsNuber+'',null,function(data){
	          	function creat(){
				   $('.qr-code').show();
			       $("#qrcodeTable").html("");
				   $("#qrcodeTable").qrcode({
					render	: "table",
					text	: data.data.invite_url,
					width:"150",
					height:"150"
					});
	   			 };
				$("#qrcodeTable").qrcode({
					render	: "table",
					text	: "",
					width:"150",
					height:"150"
				});	
				$('.copy-butn').click(function(){
					creat()
				});
	            // 判断是否加载完毕
	            if(!data.data.invites){
	               // 锁定
	                me.lock();
	              // 无数据
	              me.noData();
	            }
	            $(data.data.invites).appendTo('.Details');
	            $('.invite_code').text(data.data.invite_code)
	            projectsNuber++
	            me.resetload();
	          },false);  
	        },
	        threshold :50
	    });
	});
</script>
</body>
</html>